﻿<%@ Page Language="C#" Theme="WebMaster" MasterPageFile="~/WebMaster/MasterPage.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="webapp4U.UI.WebMaster_Default" %>
<%@ Register Src="~/WebMaster/Controls/Title.ascx" TagName="Title" TagPrefix="uc" %>
<%@ Import Namespace="webapp4U" %>
<%@ Register TagPrefix="webapp4U" Namespace="webapp4U.UI" %>

<asp:Content ID="Content1" ContentPlaceHolderID="PageContent" Runat="Server">

<uc:Title runat="server" ResourceKey='FAQ_Title'/>

<div>

<asp:UpdatePanel ID="UserUpdatePanel" runat="server" UpdateMode="Conditional">
    <ContentTemplate>

<table border="0" width="100px" cellpadding="0"  cellspacing="0" align="center">
   
  <tr>
       <td align="center">
            <asp:Panel runat="server" GroupingText="TÌM KIẾM FAQ" Font-Bold="true" ForeColor="black">
                <table width="100%" border="0" cellpadding="0" cellspacing="0" align="center">
                    <tr>
                        <td align="center" Height="40px">
                            <span class="text"><%=ResourceManager.GetString("Search") %>:</span> 
                            <asp:TextBox runat="server" CssClass="textbox" ID="txtKeyword" Width="100px" Text=""></asp:TextBox>
                            <asp:Button runat="server" ID="Button1" OnClick="btSearch_Click" Text="Search" CssClass="textbox" />        
                        </td>
                    </tr>
                </table>
            </asp:Panel>
        </td>
    </tr>
    <tr>
        <td style="padding-top:15px;">
            <a class="linkAdd" href="FAQAdd.aspx?CateID=<%=Globals.GetIntFromQueryString("CateID")%>"><%=ResourceManager.GetString("FAQ_Add")%></a>
        </td>
   </tr>
    <tr>
        <td style="padding-top:5pt;" align="center">
            <asp:GridView runat="server" Width="700px" HorizontalAlign="Center" 
                ID="GridViewItem" 
                AutoGenerateColumns="false" 
                AllowPaging="True" 
                AllowSorting="True" 
                PagerSettings-Mode="NumericFirstLast"
                GridLines="none">
                <Columns>
                    <asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="20px" HeaderStyle-Width="20px"
                        HeaderText="Delete">
                        <HeaderTemplate>
                            <input id="chkAll" onclick="javascript:SelectAllCheckboxes(this);" runat="server" type="checkbox" />
                        </HeaderTemplate>
                        <ItemTemplate>
                            <asp:CheckBox runat="server" ID="chkSelect" ToolTip='<%# Eval("FAQID") %>' />
                        </ItemTemplate>
                    </asp:TemplateField> 
                    
                    <asp:TemplateField HeaderText="Câu hỏi" 
                        HeaderStyle-Width="300" ItemStyle-Width="300" ItemStyle-Height="40"
                        HeaderStyle-HorizontalAlign="Left"
                        ItemStyle-HorizontalAlign ="left">
                        <ItemTemplate>
                            <%# Eval("Questions")%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    
                    <asp:TemplateField HeaderText="Ngày tạo" 
                        HeaderStyle-Width="100" ItemStyle-Width="100"
                        HeaderStyle-HorizontalAlign="Left"
                        ItemStyle-HorizontalAlign ="left">
                        <ItemTemplate>
                             <%# Eval("QuestionsDate")%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    
                     <asp:TemplateField HeaderText="Người tạo" 
                        HeaderStyle-HorizontalAlign="Left"
                        ItemStyle-HorizontalAlign ="left">
                        <ItemTemplate>
                               <%#Eval("AddedBy")%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    
                    <asp:TemplateField HeaderText="Ngôn ngữ" 
                        HeaderStyle-HorizontalAlign="Left"
                        ItemStyle-HorizontalAlign ="left">
                        <ItemTemplate>
                               <%#Eval("LanguageCode")%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    
                    <asp:TemplateField HeaderStyle-Width="40px" ItemStyle-Width="40px" HeaderText="Edit"
                        HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
                        <HeaderTemplate><%=ResourceManager.GetString("Edit") %></HeaderTemplate>
                        <ItemTemplate>
                            <asp:HyperLink runat="server" ID="lnkEdit" ImageUrl="~/WebMaster/Images/Edit.gif" NavigateUrl='<%# "FAQAdd.aspx?FAQID=" + (int)Eval("FAQID")+"&Action=Edit" %>'></asp:HyperLink>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <EmptyDataTemplate>
                    <table align="center" width="100%" border="0" bgcolor="#ffffcc" bordercolorlight="#0099cc"  bordercolor="#0099cc">
                        <tr>
                            <td height="50" align="center">
                                <div align="center" id="EmptyData"><%=ResourceManager.GetString("DataEmpty")%></div>
                            </td>   
                        </tr>
                    </table>
                </EmptyDataTemplate>
            </asp:GridView>            
        </td>
    </tr>
    <tr>
        <td align="right">
        <br />
        <asp:Button runat="server" ID="btDelete" Text=" Delete " OnClick="btDelete_Click" /></td>
    </tr>
    
   
            
    </table>

    </ContentTemplate>
</asp:UpdatePanel>
     
    
</div>

   
</asp:Content>

